//
//  TempViewController.swift
//  微博个人swift
//
//  Created by 李灏 on 16/2/23.
//  Copyright © 2016年 lh. All rights reserved.
//

import UIKit

class TempViewController: UIViewController {
    override func viewDidLoad() {
        //手码创建的视图控制器和视图 背景色 是 UIColor.clearColor
        self.view.backgroundColor = UIColor.whiteColor()
        //一旦完成的了导航条的返回按钮的自定义 就需要自己添加点击事件
//        let btn = UIButton(backImageName: nil, title: "返回", textColor: UIColor.darkGrayColor(), imageName: "navigationbar_back_withtext", fontSize: 14)
//        btn.addTarget(self, action: "back", forControlEvents: .TouchUpInside)
//        self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: btn)
        
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Push", style: .Plain, target: self, action: "push")
    }
    @objc private func push() {
        let temp:TempViewController = TempViewController()
        navigationController?.pushViewController(temp, animated: true)
    }

//    @objc private func back() {
//        navigationController?.popViewControllerAnimated(true)
//    }


}
